#include "user.h"



User::User(string name, string passwd, int rank, Tcpsocket *s)
    :userName(name),passwd(passwd),rank(rank),s(s)
{

}

string User::getuserName()
{
    return userName;
}

Tcpsocket *User::getSocket()
{
    return s;
}

int User::getRank()
{
    return rank;
}

void User::setRank(int rank)
{
    if(rank<=0)
    {
        this->rank=0;
    }
    else
    {
        this->rank=rank;
    }

}
